package com.ssy.system.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author sunshuaiyong
 * @ClassName Log
 * @description: TODO
 * @date 2021/11/1 14:23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_log")
public class Log implements Serializable {
    private static final long serialVersionUID = -1664875682274284315L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    private Integer userId;

    private String ip;

    private String browser;

    private String system;

    private Integer loginStart;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date loginTime;

    //登录账号
    @TableField(exist = false)
    private String userName;

    //用户名称
    @TableField(exist = false)
    private String realName;

    //登录类型
    @TableField(exist = false)
    private Integer loginType;


}
